# 导出阿贝尔群的参数信息到文件中, 同时包含阿贝尔群的直和分解数据

/home/eric/app/gap/gap-4.12.2/gap -q << EOI
filename := "abelian-groups-with-invariants.data";;
for order in [$1..$2] do
        for idx in [1..NumberSmallGroups(order)] do
                G := SmallGroup(order, idx);;
                if IsAbelian(G) then
                        AppendTo(filename, order, ",", idx, "," , AbelianInvariants(G), "\n");;
                fi;;
        od;;
od;;
EOI
